package com.sfac.dao;

import com.sfac.account.Resource;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * ResourceDao
 */
@Mapper
@Repository
public interface ResourceDao {

	@Select("select * from account_resource ar left join account_role_resource arr " +
			"on ar.id = arr.resource_id where arr.role_id = #{roleId}")
	List<Resource> getResourcesByRoleId(int roleId);
}
